<!DOCTYPE html>
<html>
<head>
<title>系统日志</title>
<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<#if shiro.hasPermission("excel:admin")>
			<a class="btn btn-default" @click="add">添加</a>
			<a class="btn btn-default" @click="update">修改</a>
			<a class="btn btn-default" @click="deleteSelected">删除</a>
			</#if>
		</div>

	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

	<div v-show="showAdd" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
				<div class="col-sm-2 control-label">id</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="uploadBean.id" name="id" readonly="readonly" />
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-2 control-label">名称</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="name" v-model="uploadBean.name"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">描述</div>
				<div class="col-sm-10">
					<textarea v-model="uploadBean.remark" name="remark" class="form-control">

					</textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">路径</div>
				<div class="col-sm-10">
					<input type="text" v-model="uploadBean.url" name="url" class="form-control">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">可用渠道</div>
				<div class="col-sm-10"  >
					<label v-for="dept in this.depts">
					<input type="checkbox"  :value="dept.deptId" v-model="uploadBean.deptIds"><label> {{dept.name}}</label>
					</label>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="saveorupdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>


	<div style="display: none;width: 100%;padding-left: 40px" id="upload">
		<form class="form-inline" id="uploadForm" style="width: 460px;margin-top: 50px">
                    <span>
                        选择文件:
                    </span>
			<span>
                          <input type="file" name="file" id="file" class="btn btn-default form-control"
								 placeholder="请选择文件" readonly>
                    </span>
		</form>
	</div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/uploadExcel.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/plugins/layui/layui.js"></script>
</body>
</html>